import axios from '@/util/request'

export const register = (user) =>{
    return axios({
        url:'/users/register',
        method:'post',
        data:user
    })
}
export const login = (username,password) =>{
    return axios({
        url:'/users/login',
        method:'get',
        params: { username, password } // GET请求用params传参
    })
}